package com.li.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

/**
 * Author: Li
 * Date: 2017/3/31
 * Description: BaseActivity
 */

public abstract class BaseActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
        initSth();
    }

    protected abstract int getLayoutId();
    protected abstract void initSth();

    protected View getContentView(){
        View view=findViewById(android.R.id.content);
        return view;
    }

}
